//目标预算
import service from '@/utils/request'
// eslint-disable-next-line no-unused-vars
const { httpPostForm, httpPost, httpGet, httpGetFile } = service

const request = {
    //===================================================目标预算（集团下发）======================================================
    //获取集团目标预算基本信息
    getGroupTargetById (billId) {
        return httpGet({
            url: '/project/groupTarget/getGroupTargetById',
            params: {
                billId: billId
            }
        })
    },
    //预算清单_细目—>结构名称
    getListToStructure (params) {
        return httpPost({
            url: '/project/groupTarget/listToStructure',
            params
        })
    },
    //预算清单_结构名称—>细目
    getStructureToList (params) {
        return httpPost({
            url: '/project/groupTarget/structureToList',
            params
        })
    },
    //根据主键查询变更历史
    getChangeHistory (billId) {
        return httpGet({
            url: '/project/groupTarget/getChangeHistory',
            params: {
                billId: billId
            }
        })
    },
    //获取集团目标预算基本信息（变更）
    getGroupTargetByIdChange (billId) {
        return httpGet({
            url: '/project/groupTargetChange/getGroupTargetById',
            params: {
                billId: billId
            }
        })
    },
    //预算清单_细目—>结构名称 (变更)
    getListToStructureChange (params) {
        return httpPost({
            url: '/project/groupTargetChange/listToStructure',
            params
        })
    },
    //预算清单_结构名称—>细目(变更)
    getStructureToListChange (params) {
        return httpPost({
            url: '/project/groupTargetChange/structureToList',
            params
        })
    },
    //===============================================目标预算（公司下发）==========================================================
    //获取公司目标预算基本信息
    getCompanyTargetById (billId) {
        return httpGet({
            url: '/project/companyTarget/getCompanyTargetById',
            params: {
                billId: billId
            }
        })
    },
    //预算清单_细目—>结构名称
    getCompanyListToStructure (params) {
        return httpPost({
            url: '/project/companyTarget/listToStructure',
            params
        })
    },
    //预算清单_结构名称—>细目
    getCompanyStructureToList (params) {
        return httpPost({
            url: '/project/companyTarget/structureToList',
            params
        })
    },
    //根据主键查询变更历史
    getCompanyChangeHistory (billId) {
        return httpGet({
            url: '/project/companyTarget/getChangeHistory',
            params: {
                billId: billId
            }
        })
    },
    //获取公司目标预算基本信息(变更)
    getCompanyTargetByIdChange (billId) {
        return httpGet({
            url: '/project/companyTargetChange/getGroupTargetById',
            params: {
                billId: billId
            }
        })
    },
    //预算清单_细目—>结构名称(变更)
    getCompanyListToStructureChange (params) {
        return httpPost({
            url: '/project/companyTargetChange/listToStructure',
            params
        })
    },
    //预算清单_结构名称—>细目(变更)
    getCompanyStructureToListChange (params) {
        return httpPost({
            url: '/project/companyTargetChange/structureToList',
            params
        })
    },
    //===============================================非生产性开支==========================================================
    //获取基本信息
    getGeneral (billId) {
        return httpGet({
            url: '/project/up/getGeneral',
            params: {
                billId: billId
            }
        })
    },
    //获取非生产性开支明细(懒加载)
    getLazyDtl (params) {
        return httpGet({
            url: '/project/up/getLazyDtl',
            params
        })
    },
    //根据主键查询变更历史
    getGeneralChangeHistory (params) {
        return httpPost({
            url: '/project/upChange/getPage',
            params
        })
    },
    //获取基本信息(变更)
    getGeneralChange (billId) {
        return httpGet({
            url: '/project/upChange/getGeneral',
            params: {
                billId: billId
            }
        })
    },
    //获取非生产性开支明细(懒加载)变更
    getLazyDtlChange (params) {
        return httpGet({
            url: '/project/upChange/getLazyDtl',
            params
        })
    },
}

export default request
